﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Symbonix.Library.Mail;
using Symbonix.NorSoNet.Framework.BLL.Configuration;

namespace Symbonix.NorSoNet.Framework
{
    public class FrameworkMailHelper
    {
        protected ISettings SiteSettings
        {
            get
            {
                return Symbonix.NorSoNet.Framework.BLL.ModuleManager.FrameworkFactory.GetSettings();
            }
        }

        protected void SendMail(string subject, string body, NameWithEmail[] receivers)
        {
            NameWithEmail sender = new NameWithEmail(SiteSettings.SiteMailSenderName, SiteSettings.SiteMailSettings.UserName);
            MailSender.SendHtmlMaill(SiteSettings.SiteMailSettings, receivers, null, null, sender, sender, subject, body, null);
        }
    }
}
